<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: LAddress Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00117.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">LAddress Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="LAddress" -->
<p>Layer address handling helper function.  
 <a href="a00117.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00316_source.html">SimpleAddress.h</a>&gt;</code></p>

<p><a href="a00804.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">L2Type</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Type definition for a L2 (MAC) address.  <a href="#aea56b60dcb5ae8c2bde465271daf7210"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">L3Type</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Type definition for a L3 (Network) address.  <a href="#ad85cd9e8d9e7e9cd5d02dd740c4a12a4"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html#a3890f1c7314c5695e32252468e6bd5a5">isL2Broadcast</a> (const <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">L2Type</a> &amp;pSrcAddr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if a L2 address (pSrcAddr) is a broadcast address.  <a href="#a3890f1c7314c5695e32252468e6bd5a5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html#a97a5c1c1f73f4255cabc4e292c4ad503">isL3Broadcast</a> (const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">L3Type</a> &amp;pSrcAddr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if a L3 address (pSrcAddr) is a broadcast address.  <a href="#a97a5c1c1f73f4255cabc4e292c4ad503"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">L2Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html#a9f975ad0433f1fb8a01164f266a41f62">L2BROADCAST</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Broadcast address for L2 addresses.  <a href="#a9f975ad0433f1fb8a01164f266a41f62"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">L2Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html#a6db1e8dbd0d23dec49ce7b59f5c15976">L2NULL</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">NULL address for L2 addresses.  <a href="#a6db1e8dbd0d23dec49ce7b59f5c15976"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a11d63e8d897e072ed94da77028d38f60"></a><!-- doxytag: member="LAddress::L3BROADCAST" ref="a11d63e8d897e072ed94da77028d38f60" args="" -->
static const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">L3Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html#a11d63e8d897e072ed94da77028d38f60">L3BROADCAST</a> = <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a>(-1)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Broadcast address for L3 addresses. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a629f951ff7bc5f42e945bbc5573c4a0f"></a><!-- doxytag: member="LAddress::L3NULL" ref="a629f951ff7bc5f42e945bbc5573c4a0f" args="" -->
static const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">L3Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00117.html#a629f951ff7bc5f42e945bbc5573c4a0f">L3NULL</a> = <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a>(0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">NULL address for L3 addresses. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Layer address handling helper function. </p>
<p>This class helps to make the layer addressing more generic. The type definition for L2, and L3 addresses should be used for address definitions to simplify the switching to other types.</p>
<p>Both types (<a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210" title="Type definition for a L2 (MAC) address.">LAddress::L2Type</a>, <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4" title="Type definition for a L3 (Network) address.">LAddress::L3Type</a>) will be used as keys in in STL containers. </p>
</div><hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="aea56b60dcb5ae8c2bde465271daf7210"></a><!-- doxytag: member="LAddress::L2Type" ref="aea56b60dcb5ae8c2bde465271daf7210" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef long <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">LAddress::L2Type</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Type definition for a L2 (MAC) address. </p>
<p>The type should support initialization with long/string values and casting to long/double. The type should be also support the ==,&lt;, and &gt; operators. </p>

</div>
</div>
<a class="anchor" id="ad85cd9e8d9e7e9cd5d02dd740c4a12a4"></a><!-- doxytag: member="LAddress::L3Type" ref="ad85cd9e8d9e7e9cd5d02dd740c4a12a4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef long <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Type definition for a L3 (Network) address. </p>
<p>The type should support initialization with long values and casting to long/double. The type should be also support the ==,&lt;, and &gt; operators. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a3890f1c7314c5695e32252468e6bd5a5"></a><!-- doxytag: member="LAddress::isL2Broadcast" ref="a3890f1c7314c5695e32252468e6bd5a5" args="(const L2Type &amp;pSrcAddr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool LAddress::isL2Broadcast </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">L2Type</a> &amp;&#160;</td>
          <td class="paramname"><em>pSrcAddr</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Test if a L2 address (pSrcAddr) is a broadcast address. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pSrcAddr</td><td>The L2 address which should be tested. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if pSrcAddr is a braodcast address. </dd></dl>

<p>Referenced by <a class="el" href="a00128.html#ab3030c86acac78401f877a61cefcdad6">Mac80211::beginNewCycle()</a>, <a class="el" href="a00067.html#afde05c6a829f672b556959acb26b0098">csma::handleLowerMsg()</a>, <a class="el" href="a00128.html#ac8bfb04590aab2434bd8d17ee4e213d9">Mac80211::handleLowerMsg()</a>, <a class="el" href="a00026.html#a413375cec02b990a521b62086a02264c">BaseMacLayer::handleLowerMsg()</a>, <a class="el" href="a00069.html#a83911b5673de047bcfc3c9b0a719ff15">CSMAMacLayer::handleLowerMsg()</a>, <a class="el" href="a00035.html#a0d6b089a3e75932385bf38815b44b8bc">BMacLayer::handleSelfMsg()</a>, <a class="el" href="a00126.html#a2397193676d296cc6757b31eef203bb3">LMacLayer::handleSelfMsg()</a>, and <a class="el" href="a00128.html#a7905be98b60b2a709dfbcd7e16bc761e">Mac80211::retrieveBitrate()</a>.</p>
<div class="fragment"><pre class="fragment">        {
<span class="preprocessor">#ifdef MIXIM_INET</span>
<span class="preprocessor"></span>            <span class="keywordflow">return</span> pSrcAddr.isBroadcast();
<span class="preprocessor">#else</span>
<span class="preprocessor"></span>            <span class="keywordflow">return</span> pSrcAddr == <a class="code" href="a00117.html#a9f975ad0433f1fb8a01164f266a41f62" title="Broadcast address for L2 addresses.">L2BROADCAST</a>;
<span class="preprocessor">#endif</span>
<span class="preprocessor"></span>        }
</pre></div>
</div>
</div>
<a class="anchor" id="a97a5c1c1f73f4255cabc4e292c4ad503"></a><!-- doxytag: member="LAddress::isL3Broadcast" ref="a97a5c1c1f73f4255cabc4e292c4ad503" args="(const L3Type &amp;pSrcAddr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool LAddress::isL3Broadcast </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">L3Type</a> &amp;&#160;</td>
          <td class="paramname"><em>pSrcAddr</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Test if a L3 address (pSrcAddr) is a broadcast address. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pSrcAddr</td><td>The L3 address which should be tested. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if pSrcAddr is a braodcast address. </dd></dl>

<p>Referenced by <a class="el" href="a00089.html#a20ab170f205c2834e998b7bbf91043c0">DummyRoute::encapsMsg()</a>, <a class="el" href="a00028.html#aad9d232f77fa033ffa2f1e7abe8e4af6">BaseNetwLayer::encapsMsg()</a>, <a class="el" href="a00094.html#ac8c12c3b58ff0f5092b2326f694a509e">Flood::handleLowerMsg()</a>, <a class="el" href="a00227.html#a30099bfda16298ba45f76f4ba2fb0985">WiseRoute::handleLowerMsg()</a>, <a class="el" href="a00227.html#aca0392ef347f060c9950238620245357">WiseRoute::handleUpperMsg()</a>, and <a class="el" href="a00156.html#adc1d59fcef6f3bc66765feb3c642a1bf">NetworkStackTrafficGen::sendBroadcast()</a>.</p>
<div class="fragment"><pre class="fragment">        {
            <span class="keywordflow">return</span> pSrcAddr == <a class="code" href="a00117.html#a11d63e8d897e072ed94da77028d38f60" title="Broadcast address for L3 addresses.">L3BROADCAST</a>;
        }
</pre></div>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a9f975ad0433f1fb8a01164f266a41f62"></a><!-- doxytag: member="LAddress::L2BROADCAST" ref="a9f975ad0433f1fb8a01164f266a41f62" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">LAddress::L2Type</a> <a class="el" href="a00117.html#a9f975ad0433f1fb8a01164f266a41f62">LAddress::L2BROADCAST</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Initial value:</b><div class="fragment"><pre class="fragment">



<a class="code" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210" title="Type definition for a L2 (MAC) address.">LAddress::L2Type</a>(-1)
</pre></div>
<p>Broadcast address for L2 addresses. </p>

<p>Referenced by <a class="el" href="a00089.html#a20ab170f205c2834e998b7bbf91043c0">DummyRoute::encapsMsg()</a>, <a class="el" href="a00180.html#a3fe5edff45548230ba917138683fd6fa">ProbabilisticBroadcast::encapsMsg()</a>, <a class="el" href="a00094.html#a4576a635c66d17c2a4f05cc6ee524791">Flood::encapsMsg()</a>, <a class="el" href="a00028.html#aad9d232f77fa033ffa2f1e7abe8e4af6">BaseNetwLayer::encapsMsg()</a>, <a class="el" href="a00180.html#afe7ebec835c0816b263c52a622a655da">ProbabilisticBroadcast::handleLowerMsg()</a>, <a class="el" href="a00094.html#ac8c12c3b58ff0f5092b2326f694a509e">Flood::handleLowerMsg()</a>, <a class="el" href="a00227.html#a30099bfda16298ba45f76f4ba2fb0985">WiseRoute::handleLowerMsg()</a>, <a class="el" href="a00180.html#a617c3e0c1a2179b6b560c2286732b2ad">ProbabilisticBroadcast::handleSelfMsg()</a>, <a class="el" href="a00035.html#a0d6b089a3e75932385bf38815b44b8bc">BMacLayer::handleSelfMsg()</a>, <a class="el" href="a00227.html#a4f0df1761deb1e98784b416ea17fc1e7">WiseRoute::handleSelfMsg()</a>, <a class="el" href="a00227.html#aca0392ef347f060c9950238620245357">WiseRoute::handleUpperMsg()</a>, <a class="el" href="a00156.html#adc1d59fcef6f3bc66765feb3c642a1bf">NetworkStackTrafficGen::sendBroadcast()</a>, and <a class="el" href="a00035.html#afeb78e201913f491b8abb8416dd6eefc">BMacLayer::sendPreamble()</a>.</p>

</div>
</div>
<a class="anchor" id="a6db1e8dbd0d23dec49ce7b59f5c15976"></a><!-- doxytag: member="LAddress::L2NULL" ref="a6db1e8dbd0d23dec49ce7b59f5c15976" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">LAddress::L2Type</a> <a class="el" href="a00117.html#a6db1e8dbd0d23dec49ce7b59f5c15976">LAddress::L2NULL</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Initial value:</b><div class="fragment"><pre class="fragment">



<a class="code" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210" title="Type definition for a L2 (MAC) address.">LAddress::L2Type</a>(0)
</pre></div>
<p>NULL address for L2 addresses. </p>

<p>Referenced by <a class="el" href="a00017.html#a1d9f02236e27d18f7674b4783469de66">BaseArp::getMacAddr()</a>, <a class="el" href="a00008.html#abab6939a0c82122391528d386df97c2c">AlohaMacLayer::initialize()</a>, and <a class="el" href="a00026.html#a61c82dc3b225eac37f7fa9936c28c2c3">BaseMacLayer::initialize()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/utils/<a class="el" href="a00316_source.html">SimpleAddress.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/utils/SimpleAddress.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00117.html">LAddress</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
